<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数据可视化-折线图</title>
    <style>
         #main {
            width : 1000px;
            height: 600px;
            margin : 50px auto;
        }
    </style>
</head>
<body>
 <div id="main"></div>
</body>
<script src="../static/js/echarts.js" charset="utf-8"></script>
<script>
    var myChart = echarts.init(document.getElementById('main'));
    var option = {
            title: {
                text: '{{title|safe}}',
                subtext: "{{subtitle|safe}}",
            },
            tooltip: {
                trigger: '{{trigger|safe}}',
            },
            legend: {
                    data: {{legend|safe}}
            },
            xAxis: {
                boundaryGap: false,
                type: 'category',
                data: {{xData|safe}}
            },
            yAxis: {
                type: 'value'
            },
            series: [{{series|safe}}]
        }
    myChart.setOption(option);
</script>
</html>